home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 15 / 015.d81 / force i (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1985-01-01  |  8.9 KB  |  296 lines

  1. 1 rem force i                                       gary v. fields  sept. 1984
  2. 2 printchr$(147)chr$(5):poke53281,2:poke53280,2:goto35000
  3. 3 poke53281,0:poke53280,0:ifx>1then35032
  4. 4 v1=54296:h1=54273:l1=54272:a1=54277:s1=54278:w1=54276:cc=54272:sq=1
  5. 5 h2=54280:l2=54279:a2=54284:s2=54285:w2=54283:fs=700:dr=5:am=10:ge=5
  6. 10 ch$=chr$(147):h$=chr$(19):sc=12
  7. 22 gosub50:gosub35032
  8. 23 print"":gosub30000:poke1944+cc,2:goto1000
  9. 24 pokew1,0:pokev1,15:pokeh1,255:pokel1,0:pokea1,180:pokes1,240:pokew1,33:return
  10. 25 pokew1,0:pokev1,15:pokeh1,0:pokel1,200:pokea1,140:pokes1,0:pokew1,33:return
  11. 27 pokew1,0:pokeh1,12:pokel1,120:pokea1,8:pokes1,0:pokew1,129:return
  12. 28 pokew1,130:pokeh1,2:pokel1,120:pokew1,129:return
  13. 29 pokew1,130:pokeh1,2:pokel1,2:pokea1,60:pokes1,0:pokew1,129:return
  14. 30 tf=1:rp=peek(ep):ifrp<33orrp>46thentf=0
  15. 31 forb=1totc:ifep=et(b)thenet(b)=1944:poke1944,34:ed=ed+1:re=re-1
  16. 32 next:ifep=mtthendr=dr-1:gosub150
  17. 33 gosub25:ford1=0to50:next:gosub27:pokeep,60:pokeec,5:ford1=0to15:next
  18. 34 gosub28:pokeep,62:pokeec,7:ford1=0to70:next
  19. 35 gosub29:ford1=0to250:next:pokeep,63:pokeec,8:ford1=0to250:next
  20. 36 pokeep,32:pokeec,0
  21. 37 ifrp=46thentf=0:rp=0:goto34
  22. 38 iftf=1andrp<37thenpokeep,62:pokeec,11:goto1100
  23. 39 pokeep,32:pokeec,0:return
  24. 40 ford1=54272to54296:poked1,0:nextd1:return
  25. 45 l%=int(rnd(0)*3)+2:return
  26. 50 gosub40:pokev1,2:pokeh1,0:pokel1,240:pokea1,0:pokes1,240:pokew1,33:return
  27. 52 pokev1,6:pokeh1,1:ford1=0to200:next:fs=fs-5:return
  28. 55 iffs<1thenfs=0:y=6:gosub1530:gosub1530:gosub1530
  29. 56 return
  30. 60 pokeet(e),32:pokeet(e)+cc,0:return
  31. 100 ifdx<1thendx=1:return
  32. 102 ifdy<1thendy=1:return
  33. 104 ifdx>38thendx=38:return
  34. 105 ifdy>16thendy=16:return
  35. 106 ifmt-ud<1104then130
  36. 107 ifmt+ud>1783then130
  37. 108 pokemt,32:pokemt+cc,0:mt=mt+ud
  38. 109 ifpeek(mt)=32then130
  39. 110 ifmt=obthenreturn
  40. 112 ifpeek(mt)=46thenep=mt:ec=mt+cc:gosub30:y=6:goto130
  41. 116 ifpeek(mt)=38thenfs=fs-6:gosub40:gosub52:y=y+2:goto130
  42. 118 ifpeek(mt)=42thenfs=1000:am=30:goto130
  43. 120 ifpeek(mt)<>32thenmt=mt-ud
  44. 122 ifts=36thendx=dx+1
  45. 123 ifts=33thendy=dy-1
  46. 124 ifts=34thendx=dx-1
  47. 125 ifts=35thendy=dy+1
  48. 130 pokemt,ts:pokemt+cc,6:return
  49. 140 ifsc<1thenreturn
  50. 141 x=0:nd=int(rnd(0)*400)+1144
  51. 142 nd=nd+1:x=x+1:ifpeek(nd)>32andpeek(nd)<37thenpokend+cc,2
  52. 143 ifpeek(nd)=46thenpokend+cc,2
  53. 144 ifx>39thenfs=fs-70:sc=sc-1:y=y+1:return
  54. 145 j=1:ifsc>9thenj=0
  55. 146 printh$tab(25)"scouts@"spc(j)sc:goto142
  56. 150 j=1:ifsc>9thenj=0
  57. 151 printh$" reports @";tab(14)chr$(18)"[151]force[160]i[146]";tab(25)"scouts@"spc(j)sc
  58. 152 as=0:ifam<10thenas=1
  59. 153 printh$:ford1=0to17:print:next:iffs<1thenfs=0
  60. 154 print"[153]gun elev@";ge;tab(14)"ammo [154]'@"spc(as)am;
  61. 155 printtab(26)"[149]fuel@        ":printchr$(145)tab(33)fs:ifdr<1thendr=0:y=6
  62. 156 print"[154]! damage@"dr;:printtab(20)"sq/mile@"sq:printtab(1)"  count@"ed;
  63. 157 printtab(20)"[f7]@scouts "
  64. 158 print"  return@ pass"tab(20)"[f8]@restart";
  65. 161 return
  66. 200 ifpeek(mt)=33thenep=mt-(ge*40):t%=33
  67. 202 ifpeek(mt)=34thenep=mt+ge:t%=34:goto223
  68. 204 ifpeek(mt)=35thenep=mt+(ge*40):t%=35
  69. 206 ifpeek(mt)=36thenep=mt-ge:t%=36:goto223
  70. 209 ifge>3thenl%=int(rnd(0)*2)+1:ep=ep+l%-2:goto220
  71. 210 ifge=3thenl%=int(rnd(0)*2):ep=ep+l%:goto220
  72. 220 ec=ep+cc:gosub30:return
  73. 223 ifge<3then220
  74. 224 ifge=3thenl%=int(rnd(0)*2)+2
  75. 225 ifge>3thengosub45
  76. 227 ifge>6thenl%=int(rnd(0)*5)+1
  77. 230 onl%goto231,232,233,234,235
  78. 231 ep=ep+80:goto220
  79. 232 ep=ep+40:goto220
  80. 233 ep=ep:goto220
  81. 234 ep=ep-40:goto220
  82. 235 ep=ep-80:goto220
  83. 300 gosub52:y=y+1:ifpeek(mt)<>36thenpokemt,36:fs=fs-6:ts=36:return
  84. 302 ud=-1:dx=dx-1:goto100
  85. 400 gosub52:y=y+1:ifpeek(mt)<>33thenpokemt,33:fs=fs-2:ts=33:return
  86. 402 ud=-40:dy=dy+1:goto100
  87. 500 gosub52:y=y+1:ifpeek(mt)<>34thenpokemt,34:fs=fs-6:ts=34:return
  88. 502 ud=1:dx=dx+1:goto100
  89. 600 gosub52:y=y+1:ifpeek(mt)<>35thenpokemt,35:fs=fs-2:ts=35:return
  90. 602 ud=40:dy=dy-1:goto100
  91. 610 forx=0todsteps
  92. 611 if(et(e)+x-mf)=mtthengosub45:ep=mt:gosub230:gosub650:x=d
  93. 612 if(et(e)+x-mf)=dp+1thenep=dp+1:ec=dp+1+cc:gosub30:gosub650:gosub30:x=d
  94. 619 next:return
  95. 650 ford1=0to100:next:return
  96. 700 ife>axthene=0:return
  97. 702 ifre<1thenreturn
  98. 704 pt=0:ifabs(mt-et(e))<160thenpt=2
  99. 705 ifet(e)>1783thenreturn
  100. 706 ifet(e)<1104thenreturn
  101. 707 ifet(e)>1600thengosub45:ep=dp+1:gosub230
  102. 708 ifdy>11thenifre>2thengosub45:ep=ob:gosub230
  103. 709 ifdr<1thenreturn
  104. 710 ifnd>15thend=520:s=40:mf=120:pokeet(e),ch:gosub610
  105. 714 ifnd>20thend=12:s=1:mf=12:pokeet(e),36:gosub610:ifl%>3thengosub610
  106. 715 ifnd>40thend=12:s=1:mf=0:pokeet(e),34:gosub610:ifl%>4thengosub610
  107. 716 ifnd<15thend=240:s=-80:mf=120:pokeet(e),ch:gosub610:ifl%>3thengosub610
  108. 717 ifdr<1thenreturn
  109. 720 ifabs(et(e)-mt)=1thenep=mt:ec=mt+cc:gosub30
  110. 722 ifabs(et(e)-mt)=40thenep=mt:ec=mt+cc:gosub30
  111. 725 ifet(e)+40>1702anddy<3thengosub45:ep=dp+1:gosub230:goto735
  112. 730 ifmt-et(e)>20thench=35:wa%=40:goto740
  113. 732 ifmt-et(e)<-20thench=33:wa%=-40:goto740
  114. 733 ifet(e)<mtthenifet(e)-mt<dxthench=34:wa%=1:goto740
  115. 734 ifet(e)>mtthenifet(e)-mt<39thench=36:wa%=-1:goto740
  116. 735 wa%=0:ch=35:return
  117. 740 ey=peek(et(e)+wa%):ifey<>32thengosub900
  118. 800 pokeet(e),32:et(e)=et(e)+wa%:pokeet(e),ch:pokeet(e)+cc,pt:return
  119. 900 ifey=38thenreturn
  120. 902 ifey=46thengoto995
  121. 904 ifey>36theney=int(rnd(0)*20):ifey>15thengoto995
  122. 906 ey=int(rnd(0)*4)+1
  123. 908 ifey=1then735
  124. 910 ifey=2thenifpeek(et(e)+1)=32thenwa%=1:ch=34:return
  125. 912 ifey=3thenifpeek(et(e)-1)=32thenwa%=-1:ch=36:return
  126. 914 ifey>3thenifpeek(et(e)-40)=32thenwa%=-40:ch=33:return
  127. 990 goto735
  128. 995 ep=et(e)+wa%:ec=ep+cc:gosub30:return
  129. 1000 fs=fs-1:gosub50:gosub150:ifdr<1then4050
  130. 1001 gosub1200:gosub2500:y=0:poke198,0
  131. 1002 printh$"[154] move cmd@":gosub55
  132. 1003 gosub1200:iffs>0thenonjvgosub400,600,1525,300,1525,1525,1525,500
  133. 1004 gosub40:gosub50:getq$:ifq$=chr$(140)then4050
  134. 1005 gosub1140:ifmt=obandoc=1then5000
  135. 1006 ifq$=chr$(160)thengosub4060
  136. 1007 ifq$=chr$(136)thengosub140
  137. 1008 ifq$=chr$(13)theny=6
  138. 1009 iffs<1andam<1thengosub152:goto4050
  139. 1010 gosub152:ify<6then1002
  140. 1011 poke198,0:fl=4:gosub2501:printh$chr$(18)"enemy move"
  141. 1012 nd=int(rnd(0)*150)+1:ifnd>100andpeek(dp+1)=32thenpokedp+1,42:pokedp+cc+1,6
  142. 1013 ifnd<50thenpokeob,44:pokeob+cc,2
  143. 1014 gosub2000:ifdr<1then4050
  144. 1015 ifdy>14andre>2thengosub1500
  145. 1017 ifre<2then1028
  146. 1018 ifnd>80thenifdr>1thengosub1500
  147. 1028 oc=0:ifpeek(ob)=44thenoc=1
  148. 1029 ifq$=chr$(13)thengosub45:ifl%=3thengosub1530
  149. 1030 goto1000
  150. 1100 iftf=1thenifep=mtthenifdr>0thentf=int(rnd(0)*4)+1:pokemt,tf+32:tf=0
  151. 1140 ifq$="e"thengosub400
  152. 1141 ifq$="x"thengosub600
  153. 1142 ifq$="d"thengosub500
  154. 1143 ifq$="s"thengosub300
  155. 1144 ifdy>13thenifre>2thenifdr>0thenl%=int(rnd(0)*2)+2:ep=mt:gosub230
  156. 1145 ifdr<1theny=6
  157. 1146 gosub50:return
  158. 1200 jv=peek(56320):fr=jvand16:jv=15-(jvand15):return
  159. 1500 ifdy>12andre>1then1530
  160. 1508 ifdy>8andre>2then1530
  161. 1510 ifdy>6andre>3then1530
  162. 1515 ifdy>3andre>4then1530
  163. 1520 ey=int(rnd(0)*20):ifey>18then1530
  164. 1525 return
  165. 1530 printh$"incoming@'":x=int(rnd(0)*6)-3:ep=mt+x:ec=ep+cc
  166. 1532 gosub24:ford1=0to500:next:gosub40:gosub30
  167. 1540 return
  168. 2000 fore=0toax:ifet(e)=1944then2004
  169. 2002 gosub700:ifdr<1thene=ax
  170. 2004 nexte:return
  171. 2500 poke198,0:fl=am
  172. 2501 ifdr<1thenreturn
  173. 2502 fory=0tofl:printh$chr$(18)" gun cmd @":getq$
  174. 2503 ifq$=chr$(13)theny=fl:goto2620
  175. 2504 ifq$=chr$(134)thenge=ge+1:ifge>8thenge=9
  176. 2505 ifq$=chr$(160)thengosub4060
  177. 2506 ifq$=chr$(135)thenge=ge-1:ifge<2thenge=1
  178. 2507 ifq$=chr$(140)then4050
  179. 2508 ifmt<1265andpeek(mt)=33andge>3thenge=3
  180. 2510 ifdx<9thenifpeek(mt)=36thenifge>dxthenge=dx
  181. 2512 ifdx>31thenifpeek(mt)=34thenifge>39-dxthenge=39-dx
  182. 2514 ifdy<5thenifpeek(mt)=35thenifge>5thenge=5
  183. 2600 printh$"[150] fire cmd@"
  184. 2604 gosub1200
  185. 2605 ifam<1thenam=0:goto2620
  186. 2610 ifq$=chr$(133)thenfr=0
  187. 2612 iffr=0thenam=am-1:gosub200:fs=fs-2
  188. 2620 fs=fs-1:gosub152:nexty:return
  189. 4050 poke198,0:printh$:print:print:print:print"try again [y/n]"
  190. 4052 getq$:ifq$=""then4052
  191. 4054 ifq$="y"thenprintch$:clr:x=1:goto3
  192. 4056 ifq$<>"n"then4052
  193. 4058 gosub40:sys64738
  194. 4060 poke198,0:printh$"[158]  pause   "
  195. 4062 getq$:ifq$=""then4060
  196. 4063 printh$"          ":return
  197. 5000 gosub40:ifsq>5then5008
  198. 5002 sq=sq+1:dr=dr+1:sc=12:zx=0::fs=1000:am=am+15:ifam>24thenam=24
  199. 5004 goto23
  200. 5008 printchr$(147)"the battle is won"
  201. 5010 ed=ed*2:forx=1toed:l%=int(rnd(0)*4)+1:poke1104+x,l%+32:poke1104+x+cc,2
  202. 5011 x=x+1:forsq=0to50:nextsq:next
  203. 5012 poke1964,33:poke1964+cc,6
  204. 5014 forx=1toed:ep=1104+x:ec=ep+cc:gosub24:ford1=0to100:nextd1:gosub30
  205. 5016 pokeep,44:pokeec,2:x=x+1:next:gosub40:forx=0to12:print:next
  206. 5018 printchr$(18)" final score "
  207. 5020 print:print" total enemy count "ed/2
  208. 5022 print" final damage report "dr
  209. 5024 print:printchr$(18)" battle record "((dr*100)+(am*10)+fs)*sc
  210. 5030 forx=0to1000:next:goto4050
  211. 30000 printch$:print:forx=0to39:print";";:next
  212. 30001 forx=0to15:print:next:forx=0to39:print";";:next
  213. 30010 tc=5:tr=int(rnd(0)*60)+5
  214. 30012 forx=0totr:y=int(rnd(0)*640)+1144:pokey,37:pokey+cc,tc
  215. 30014 iftc=5thentc=9:goto30020
  216. 30016 iftc=9thentc=5
  217. 30020 next
  218. 30026 bw=int(rnd(0)*10)+1
  219. 30028 forx=0tobw:y=int(rnd(0)*560)+1184
  220. 30029 forz=oto4:pokey+z,38:pokey+z+cc,11:next:next
  221. 30036 bw=int(rnd(0)*10)+1
  222. 30038 forx=0tobw:y=int(rnd(0)*560)+1184
  223. 30039 forz=oto2:pokey+z,43:pokey+z+1,45::pokey+z+cc,11:pokey+z+cc+1,11:next:next
  224. 30040 bw=int(rnd(0)*30)+2:forx=0to4:bw=bw+40
  225. 30042 pokebw+1264,61:pokebw+1264+cc,12:next
  226. 30050 z=int(rnd(0)*6)+1
  227. 30051 mf=int(rnd(0)*15)+2
  228. 30052 y=int(rnd(0)*40)+1560:y=y+mf
  229. 30054 forx=0toz:pokey+x,46:pokey+x+cc,15:next
  230. 30056 z=z-1:forx=0toz:pokey+x+40,46:pokey+x+40+cc,15:next
  231. 30057 z=z-1:forx=0toz:pokey+x+80,46:pokey+x+80+cc,15:next
  232. 30060 z=int(rnd(0)*8)+2
  233. 30062 forx=0toz:y=int(rnd(0)*500)+1:y=1144+y:pokey,46:pokey+cc,0
  234. 30064 hm(x)=y:next
  235. 30070 x=int(rnd(0)*30)+2:ob=x+1144:pokeob,44:pokeob+cc,2
  236. 30090 x=int(rnd(0)*19)+1:mt=x+1744:dx=x:dy=1:ts=33:pokemt,ts:pokemt+cc,6
  237. 30098 x=int(rnd(0)*20)+17:dp=x+1704
  238. 30099 pokedp,61:pokedp+1,42:pokedp+2,61:pokedp-39,32:pokedp+41,32
  239. 30100 pokedp+cc,11:pokedp+1+cc,6:pokedp+2+cc,11
  240. 30102 ifsq=0thenx=3
  241. 30103 ifsq=1thenx=4
  242. 30104 ifsq=2thenx=5
  243. 30106 ifsq=3thenx=6
  244. 30107 ifsq>3thenx=7
  245. 30110 tc=int(rnd(1)*x)+3:re=tc:ax=tc
  246. 30115 forx=1totc:y=int(rnd(0)*75)+1:et(x)=y+1184
  247. 30120 pokeet(x),35:pokeet(x)+cc,0:next
  248. 30125 return
  249. 35000 printchr$(5)chr$(147):print:print
  250. 35020 print" % [213][195][195][195] [213][195][195][195][201] [213][195][195][195][201] [213][195][195][195][201] [213][195][195]    [195][178][195]"
  251. 35022 print"   [194] %% [194] [129]% [194] [194]   [194] [194] %[129]%  [194]       [194]"
  252. 35024 print"   [171][195][195]  [194]   [194] [171][195][178][195][203] [194]  [129]%  [171][195]  %%  [194]"
  253. 35026 print"   [194]    [194] [129]% [194] [194]# [205]  [194]#   [129]%[194] #     [194]"
  254. 35028 print" [129]%%[194] #  [202][195][195][195][203] [194] % [212] [202][195][195][195][203] [202][195][195][195] [129]% [195][177][195]"
  255. 35030 print:printtab(11)", by g  fields *":goto47000
  256. 35032 printh$:forx=0to9:print:next:printtab(12)"joystick port@2"
  257. 35034 print:printtab(14)"f1 to begin":print:printtab(14)"f8 to quit"
  258. 35036 x=int(rnd(0)*20)+15:x=x+1904:y=x+cc:pokex,33:pokey,6
  259. 35040 gosub40:gosub50:getq$:ifq$=chr$(133)then return
  260. 35041 x=x-40:y=y-40:ifx<1300thenreturn
  261. 35042 ep=int(rnd(0)*3)+1:ep=ep+x:ec=ep+cc:gosub30:ifq$=chr$(140)then4050
  262. 35043 ifep-x>1thenep=ep+36:ec=ec+36:gosub30
  263. 35044 pokey+40,0:pokex,33:pokey,6
  264. 35045 forz=0to1:ep=int(rnd(0)*40)+1:ep=1274+ep:ec=ep+cc
  265. 35046 gosub30:nextz
  266. 35200 ifq$<>chr$(133)then35040
  267. 40001 data033,008,008,107,107,127,127,127,099
  268. 40002 data034,000,252,252,112,127,112,252,252
  269. 40003 data035,198,254,254,254,214,214,016,016
  270. 40004 data036,063,063,014,254,014,063,063,000
  271. 40005 data037,036,094,187,127,234,119,092,016
  272. 40006 data038,000,134,073,048,073,134,000,000
  273. 40008 data039,198,214,108,040,040,056,056,016
  274. 40011 data060,016,147,199,235,203,203,008,008
  275. 40012 data062,022,052,008,003,216,004,062,038
  276. 40013 data063,066,000,194,011,068,034,065,152
  277. 40015 data058,255,170,255,160,224,160,224,160
  278. 40016 data059,255,170,255,000,000,000,000,000
  279. 40017 data061,255,085,255,044,052,044,052,044
  280. 40018 data043,240,088,168,248,063,037,058,015
  281. 40019 data045,015,058,037,063,248,168,088,240
  282. 40020 data046,000,204,000,051,000,204,000,051
  283. 40021 data000,000,096,096,000,000,096,096,000
  284. 40022 data042,255,142,180,180,142,255,192,192
  285. 40023 data044,000,255,177,183,129,237,141,255,-1
  286. 47000 print:printtab(14)"wait while":print:printtab(14)"the troops"
  287. 47001 print:printtab(17)"dress"
  288. 47002 poke56,48:clr
  289. 47003 poke56334,peek(56334)and254:poke1,peek(1)and251
  290. 47004 fori=0to2047:poke12288+i,peek(53248+i):next
  291. 47005 poke1,peek(1)or4:poke56334,peek(56334)or1
  292. 47006 reada:ifa=-1then47008
  293. 47007 fori=0to7:readb:poke12288+a*8+i,b:next:goto47006
  294. 47008 poke53272,(peek(53272)and240)or12
  295. 47009 run3
  296.